package ziv.map;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Picture;
import android.graphics.Point;

import com.baidu.mapapi.GeoPoint;
import com.baidu.mapapi.MapView;
import com.baidu.mapapi.Overlay;

public class MyOverlay extends Overlay {
	GeoPoint geoPoint=null;//new GeoPoint((int)(39.915*1E6),(int)(116.404*1E6));
	Paint paint=new Paint();
	Point point=null;
	@Override
	public void draw(Canvas canvas, MapView mMapView, boolean arg2) {
		// TODO Auto-generated method stub
		
		if(point==null)
			point=mMapView.getProjection().toPixels(geoPoint, null);
		//System.out.println("point.x="+point.x);
		//System.out.println("point.y="+point.y);
		paint.setColor(Color.RED);
		paint.setTextSize(14);
		canvas.drawText("★", point.x, point.y, paint);
		
	//	Picture picture=new Picture(R.drawable.iconmark);
		//Bitmap bitmap=new Bitmap();
		
		//canvas.setBitmap(bitmap)
	}
	public Point getPoint() {
		return point;
	}
	public void setPoint(Point point) {
		this.point = point;
	}
	public GeoPoint getGeoPoint() {
		return geoPoint;
	}
	public void setGeoPoint(GeoPoint geoPoint) {
		this.geoPoint = geoPoint;
	}
	
	

}
